import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../views/Login.vue"
import Main from "../views/Main.vue"
import Wode from "../views/Wode.vue"
import Teacher from "../views/Teacher.vue"
import Student from "../views/Student.vue"
import Insertstudent from "../views/Insertstudent.vue"
import Insertteacher from "../views/Insertteacher.vue"
import Rili from "../views/Date.vue"
import Scoreselect from "../views/Scoreselect.vue"
import Classshow from "../views/Classshow.vue"
import Zhuce from "../views/Zhuce.vue"
import Rizhi from "../views/Rizhi.vue"
Vue.use(VueRouter)



const routes = [
  //登录
  {
    path: '/',
    name: 'login',
    component: Login
  },
  {
    path: '/zhuce',
    name: 'zhuce',
    component: Zhuce
  },
  {
    path: '/main',
    name: 'main',
    component:Main
  },
  {
    path:"/wode",
    name:'wode',
    component:Wode
  },
  {
    path:"/teacher",
    name:"teacher",
    component:Teacher
  },
  {
    path:"/student",
    name:"student",
    component:Student
  },
  {
    path:"/insertstudent",
    name:"Insertstudent",
    component:Insertstudent
  },
  {
    path:"/insertteacher",
    name:"Insertteacher",
    component:Insertteacher
  },
  {
    path:"/date",
    name:"Rili",
    component:Rili
  },
  {
    path:"/scoreselect",
    name:"Scoreselect",
    component:Scoreselect
  },
  {
    path:"/classshow",
    name:"Classshow",
    component:Classshow
  },
  {
    path:"/rizhi",
    name:"Rizhi",
    component:Rizhi
  }
]

const router = new VueRouter({
  routes,
  mode:'history'
})
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(to) {
  return originalPush.call(this, to).catch(err => err)
}

export default router
